home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / exit.c < prev    next >
C/C++ Source or Header  |  1996-01-30  |  1KB  |  45 lines

  1. /*
  2.     GWAda Development Environment for 386/486 PCs   
  3.     Copyright (C) 1993, Arthur Vargas Lopes  & Michael Bliss Feldman
  4.                         vlopes@vortex.ufrgs.br mfeldman@seas.gwu.edu
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; version 2 of the License.    
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. /* exit.c */
  21.  
  22. #include "externs.h"
  23.  
  24.  
  25. void AVL_EXIT()
  26. {
  27.     char msg[80];
  28.     int i;
  29.     AVL_EDIT_WINDOW_PTR w;
  30.     for(i = 0; i < avl_nwindows; ++i)  {
  31.         w = &avl_windows[avl_window = i];
  32.         sprintf(msg," Save %s (Y/N) ? ", w -> file_name);
  33.         if (w -> changed)
  34.             if (do_not_realy_exit && i == 0)  
  35.                 AVL_SAVE();
  36.             else if (AVL_QUESTION(msg) == 'Y')
  37.                 AVL_SAVE();
  38.         }
  39.     _setvideomode( _DEFAULTMODE );
  40.     if (!do_not_realy_exit)  {
  41.         exit(0);
  42.         AVL_RESTORE_I23();
  43.         }
  44. }
  45.